package com.spring.cloud.consume.config;

import feign.Retryer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import static java.util.concurrent.TimeUnit.SECONDS;

@Configuration
public class FeignCofig {

    @Bean
    public Retryer feignRetyryer(){
        //默认间隔100 毫秒  最大重试时间为1秒 ，重试次数为5
        return new Retryer.Default(100,SECONDS.toMillis(1),3);
    }
}
